﻿<Page
    x:Class="SoftKeypadUWPApp.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:SoftKeypadUWPApp"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Page.Resources>
        
    </Page.Resources>

    <Grid x:Name="Layout">
        <Grid.Background>
            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="White" Offset="1"/>
                <GradientStop Color="LightCoral" Offset="0.75"/>
                <GradientStop Color="LightYellow" Offset="0.5"/>
                <GradientStop Color="LightYellow" Offset="0.25"/>
                <GradientStop Color="LightSkyBlue" Offset="0"/>
            </LinearGradientBrush>
        </Grid.Background>
        <Grid.RowDefinitions>
            <RowDefinition Height="27"/>
            <RowDefinition Height="200"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <TextBlock x:Name="Title" Text="Title" Grid.Row="0" />
        <Grid Margin="0,0,0,0" x:Name="SoftKeypad" Grid.Row="1" >
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="50" x:Name="Col1"  />
                <ColumnDefinition Width="50" x:Name="Col2"  />
                <ColumnDefinition Width="50" x:Name="Col3"  />
                <ColumnDefinition Width="50" x:Name="Col4"  />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="50"/>
                <RowDefinition Height="50"/>
                <RowDefinition Height="50"/>
                <RowDefinition Height="50"/>
            </Grid.RowDefinitions>

            <Button Grid.Row="0" Grid.Column="0" Content="1" Width="45" Height="45" Background="Black" Foreground="White" KeyDown="Button_KeyDown" KeyUp="Button_KeyUp" Holding="Button_Holding" Tag="1" Tapped="Button_Tapped"/>
            <Button Grid.Row="0" Grid.Column="1" Content="2" Width="45" Height="45" Background="Black" Foreground="White" KeyDown="Button_KeyDown" KeyUp="Button_KeyUp" Holding="Button_Holding" Tag="2" Tapped="Button_Tapped"/>
            <Button Grid.Row="0" Grid.Column="2" Content="3" Width="45" Height="45" Background="Black" Foreground="White" KeyDown="Button_KeyDown" KeyUp="Button_KeyUp" Holding="Button_Holding" Tag="3" Tapped="Button_Tapped"/>
            <Button Grid.Row="1" Grid.Column="0" Content="4" Width="45" Height="45" Background="Black" Foreground="White" KeyDown="Button_KeyDown" KeyUp="Button_KeyUp" Holding="Button_Holding" Tag="4" Tapped="Button_Tapped"/>
            <Button Grid.Row="1" Grid.Column="1" Content="5" Width="45" Height="45" Background="Black" Foreground="White" KeyDown="Button_KeyDown" KeyUp="Button_KeyUp" Holding="Button_Holding" Tag="5" Tapped="Button_Tapped"/>
            <Button Grid.Row="1" Grid.Column="2" Content="6" Width="45" Height="45" Background="Black" Foreground="White" KeyDown="Button_KeyDown" KeyUp="Button_KeyUp" Holding="Button_Holding" Tag="6" Tapped="Button_Tapped"/>
            <Button Grid.Row="2" Grid.Column="0" Content="7" Width="45" Height="45" Background="Black" Foreground="White" KeyDown="Button_KeyDown" KeyUp="Button_KeyUp" Holding="Button_Holding" Tag="7" Tapped="Button_Tapped"/>
            <Button Grid.Row="2" Grid.Column="1" Content="8" Width="45" Height="45" Background="Black" Foreground="White" KeyDown="Button_KeyDown" KeyUp="Button_KeyUp" Holding="Button_Holding" Tag="8" Tapped="Button_Tapped" />
            <Button Grid.Row="2" Grid.Column="2" Content="9" Width="45" Height="45" Background="Black" Foreground="White" KeyDown="Button_KeyDown" KeyUp="Button_KeyUp" Holding="Button_Holding" Tag="9" Tapped="Button_Tapped"/>
            <Button Grid.Row="3" Grid.Column="0" Content="*" Width="45" Height="45" Background="Black" Foreground="White" KeyDown="Button_KeyDown" KeyUp="Button_KeyUp" Holding="Button_Holding" Tag="*" Tapped="Button_Tapped"/>
            <Button Grid.Row="3" Grid.Column="1" Content="0" Width="45" Height="45" Background="Black" Foreground="White" KeyDown="Button_KeyDown" KeyUp="Button_KeyUp" Holding="Button_Holding" Tag="0" Tapped="Button_Tapped"/>
            <Button Grid.Row="3" Grid.Column="2" Content="#" Width="45" Height="45" Background="Black" Foreground="White" KeyDown="Button_KeyDown" KeyUp="Button_KeyUp" Holding="Button_Holding" Tag="#" Tapped="Button_Tapped"/>
            <Button Grid.Row="3" Grid.Column="3" Content="T" Width="45" Height="45" Background="#FF108710" Foreground="White" KeyDown="Button_KeyDown" KeyUp="Button_KeyUp" Holding="Button_Holding" Tag="T" Tapped="Button_Tapped"/>
            <Button Grid.Row="2" Grid.Column="3" Content="C" Width="45" Height="45" Background="#FF108710" Foreground="White" KeyDown="Button_KeyDown" KeyUp="Button_KeyUp" Holding="Button_Holding" Tag="C" Tapped="Button_Tapped"/>

        </Grid>
        <StackPanel Grid.Row="2">
            <TextBox x:Name="Output" Height="200" Width="400"
                     ScrollViewer.IsVerticalRailEnabled="True" TextWrapping="Wrap" AcceptsReturn="True" IsReadOnly="True" ScrollViewer.VerticalScrollBarVisibility="Visible" 
                     />
        </StackPanel>

    </Grid>
</Page>
